//
//  DraftBoxViewController.swift
//  MyTest
//
//  Created by guanzhongwang on 2021/5/14.
//

import UIKit

class DraftBoxViewController: CommonViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
        title = "草稿箱"
        let rightItem = UIBarButtonItem.init(title: "管理", style: .plain, target: self, action: #selector(manager))
        rightItem.tintColor = B999_TITLE_COLOR
        rightItem.isEnabled = DataManager.login
        self.navigationItem.rightBarButtonItem = rightItem
        placeholderView = PlaceholderView(.NoContent)
        self.navigationController?.modalPresentationCapturesStatusBarAppearance = false
        self.navigationController?.navigationBar.subviews.first?.alpha = 1
        self.navigationController?.navigationBar.barStyle = .default
        self.navigationController?.setNavigationBarHidden(true, animated: true)
        statusBarStyle = .default
        
        UIView.animate(withDuration: 0.5) {
            self.placeholderView?.alpha = 0
        }

    }
    override var preferredStatusBarStyle: UIStatusBarStyle{
        return .default
    }
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        self.navigationController?.setNavigationBarHidden(false, animated: true)
    }

    @objc func manager(){
        self.pushViewController(FansViewController(), animated: true)
    }
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
